#define isdigit isalpha

int main(){
    char s[]="There   are   apples;   oranges   and   peaches   on   the   table.   ";
    int tot=0,i=0,n=strlen(s);
    for(;i<n;){
           while(i<n&&isdigit(s[i])==0)i++;
           if(isdigit(s[i]))
                ++tot;
           while(i<n&&isdigit(s[i])){
                putchar(s[i]);
                i++;
           }
           putchar('\n');
    }
    printf("%d\n",tot);

    return 0;
}
